home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / mxutil / tspak17 / divider.doc < prev    next >
Encoding:
Text File  |  1994-07-26  |  22.8 KB  |  437 lines

  1. Tandy DAC package
  2. DAC Divider Values - Experimental Results
  3.  
  4. Contents
  5. --------
  6.  
  7. 1.  Introduction
  8. 2.  Recording Divider vs. Playback Divider
  9. 3.  Recording Divider vs. Sampling Rate
  10. 4.  Sampling Rate vs. Recording Divider
  11. 5.  Playback Divider vs. Sampling Rate
  12.  
  13.  
  14. Introduction
  15. ------------
  16.  
  17. While working with Recwav, I found that Playwav would not play back at the 
  18. same rate as the music was supposedly recorded.  Part of the problem is due 
  19. to the fact that there are not many recording dividers to choose from at 
  20. high sampling rates, but the problem also happened at lower rates as well.
  21.  
  22. I needed to be certain of the sampling rates to record music samples 
  23. accurately for mixing (i.e., to make chord samples).  Hoping to get to the 
  24. root of the matter, I performed an investigation, and these are the 
  25. results.
  26.  
  27.  
  28. Recording Divider vs. Playback Divider
  29. --------------------------------------
  30.  
  31. The following table was obtained using Testdiv (included with this pack- 
  32. age).  The procedure was to record a clarinet sample (the closest thing to 
  33. a pure tone on my keyboard) with each recording divider, then play back 
  34. with various playback dividers until the playback pitch matched the 
  35. keyboard pitch as nearly as possible.
  36.  
  37. A least-squares line was found, where the independent variable was the 
  38. recording divider and the dependent variable was the playback divider.  
  39. This line was used to find the computed values below:
  40.  
  41.   playback_divider = (10.00302391 * recording_divider) + 12.477531646
  42.  
  43. Recording    Playback     Playback div-          Residual
  44.  divider     divider     ider (computed)    (computed - actual)
  45. ---------    --------    ---------------    -------------------
  46.  
  47.     1           21            22.481               1.481
  48.     2           31            32.484               1.484
  49.     3           42            42.487               0.487
  50.     4           57            52.490              -4.510
  51.     5           60            62.493               2.493
  52.     6           71            72.496               1.496
  53.     7           85            82.499              -2.501
  54.     8           92            92.502               0.502
  55.     9          102           102.505               0.505
  56.    10          114           112.508              -1.492
  57.    11          121           122.511               1.511
  58.    12          133           132.514              -0.486
  59.    13          143           142.517              -0.483
  60.    14          152           152.520               0.520
  61.    15          167           162.523              -4.477
  62.    16          171           172.526               1.526
  63.    17          181           182.529               1.529
  64.    18          190           192.532               2.532
  65.    19          200           202.535               2.535
  66.    20          211           212.538               1.538
  67.    21          228           222.541              -5.459
  68.    22          231           232.544               1.544
  69.    23          242           242.547               0.547
  70.    24          253           252.550              -0.450
  71.    25          262           262.553               0.553
  72.    26          273           272.556              -0.444
  73.    27          285           282.559              -2.441
  74.    28          291           292.562               1.562
  75.    29          303           302.565              -0.435
  76.    30          313           312.568              -0.432
  77.    31          323           322.571              -0.429
  78.    32          336           332.574              -3.426
  79.    33          342           342.577               0.577
  80.    34          352           352.580               0.580
  81.    35          361           362.583               1.583
  82.    36          371           372.586               1.586
  83.    37          380           382.589               2.589
  84.    38          399           392.592              -6.408
  85.    39          400           402.595               2.595
  86.    40          412           412.598               0.598
  87.    41          422           422.602               0.602
  88.    42          432           432.605               0.605
  89.    43          442           442.608               0.608
  90.    44          456           452.611              -3.389
  91.    45          461           462.614               1.614
  92.    46          471           472.617               1.617
  93.    47          485           482.620              -2.380
  94.    48          493           492.623              -0.377
  95.    49          504           502.626              -1.374
  96.    50          513           512.629              -0.371
  97.    51          522           522.632               0.632
  98.    52          532           532.635               0.635
  99.    53          542           542.638               0.638
  100.    54          551           552.641               1.641
  101.    55          570           562.644              -7.356
  102.    56          570           572.647               2.647
  103.    57          582           582.650               0.650
  104.    58          591           592.653               1.653
  105.    59          601           602.656               1.656
  106.    60          612           612.659               0.659
  107.    61          627           622.662              -4.338
  108.    62          631           632.665               1.665
  109.    63          641           642.668               1.668
  110.    64          655           652.671              -2.329
  111.    65          662           662.674               0.674
  112.    66          672           672.677               0.677
  113.    67          684           682.680              -1.320
  114.    68          691           692.683               1.683
  115.    69          703           702.686              -0.314
  116.    70          713           712.689              -0.311
  117.    71          722           722.692               0.692
  118.    72          738           732.695              -5.305
  119.    73          741           742.698               1.698
  120.    74          752           752.701               0.701
  121.    75          760           762.704               2.704
  122.    76          771           772.707               1.707
  123.    77          781           782.710               1.710
  124.    78          798           792.713              -5.287
  125.    79          801           802.716               1.716
  126.    80          812           812.719               0.719
  127.  
  128.  
  129. Recording Divider vs. Sampling Rate
  130. -----------------------------------
  131.  
  132. The actual sampling rate for each recording divider was measured with a 
  133. special program, Testrec.  Testrec filled a 65535-byte buffer with sound 
  134. twice and measured the elapsed time using the PC's programmable interval 
  135. timer.
  136.  
  137. A least-squares line was found, where the independent variable was the 
  138. recording divider and the dependent variable was the reciprocal of the 
  139. sampling rate.  This line was used to find the computed values below:
  140.  
  141.         1
  142.   ------------- = (2.793150E-06 * recording_divider) + 3.575443E-06
  143.   sampling_rate
  144.  
  145. Recording    Sampling rate,    Sampling rate,         Residual
  146.  divider      Hz (actual)      Hz (computed)     (computed - actual)
  147. ---------    --------------    --------------    -------------------
  148.  
  149.     1          156052.044        157020.522            968.478
  150.     2          115784.421        109149.516          -6634.905
  151.     3           83690.555         83647.743            -42.812
  152.     4           62776.794         67805.594           5028.801
  153.     5           58902.894         57008.655          -1894.239
  154.     6           50223.874         49177.877          -1045.997
  155.     7           41855.727         43238.575           1382.848
  156.     8           38666.527         38579.283            -87.244
  157.     9           34934.468         34826.462           -108.006
  158.    10           31394.232         31739.031            344.799
  159.    11           29507.844         29154.435           -353.409
  160.    12           26909.865         26959.083             49.219
  161.    13           25116.180         25071.202            -44.977
  162.    14           23546.478         23430.425           -116.053
  163.    15           21571.257         21991.216            419.959
  164.    16           20930.782         20718.582           -212.200
  165.    17           19696.155         19585.185           -110.970
  166.    18           18779.187         18569.360           -209.827
  167.    19           17856.326         17653.715           -202.612
  168.    20           16907.821         16824.126            -83.696
  169.    21           15698.547         16069.006            370.459
  170.    22           15504.791         15378.759           -126.033
  171.    23           14775.102         14745.369            -29.734
  172.    24           14142.330         14162.088             19.759
  173.    25           13651.017         13623.198            -27.819
  174.    26           13137.240         13123.815            -13.425
  175.    27           12559.070         12659.749            100.679
  176.    28           12289.002         12227.382            -61.620
  177.    29           11801.303         11823.572             22.269
  178.    30           11417.396         11445.582             28.186
  179.    31           11081.540         11091.011              9.471
  180.    32           10647.172         10757.748            110.576
  181.    33           10465.832         10443.929            -21.903
  182.    34           10184.170         10147.900            -36.270
  183.    35            9915.147          9868.190            -46.957
  184.    36            9660.952          9603.486            -57.467
  185.    37            9404.320          9352.611            -51.709
  186.    38            8970.912          9114.511            143.598
  187.    39            8944.488          8888.232            -56.256
  188.    40            8683.834          8672.917            -10.917
  189.    41            8471.381          8467.787             -3.594
  190.    42            8291.352          8272.136            -19.216
  191.    43            8098.821          8085.322            -13.499
  192.    44            7849.594          7906.759             57.166
  193.    45            7762.950          7735.914            -27.036
  194.    46            7583.827          7572.295            -11.533
  195.    47            7387.860          7415.454             27.594
  196.    48            7257.915          7264.978              7.063
  197.    49            7098.064          7120.488             22.424
  198.    50            6977.443          6981.633              4.190
  199.    51            6860.313          6848.090            -12.223
  200.    52            6728.250          6719.560             -8.690
  201.    53            6610.217          6595.766            -14.451
  202.    54            6496.240          6476.450            -19.790
  203.    55            6279.715          6361.375             81.660
  204.    56            6279.698          6250.318            -29.381
  205.    57            6153.434          6143.071            -10.362
  206.    58            6054.257          6039.444            -14.814
  207.    59            5955.558          5939.254            -16.305
  208.    60            5841.633          5842.334              0.701
  209.    61            5708.848          5748.527             39.678
  210.    62            5675.196          5657.684            -17.512
  211.    63            5581.973          5569.668            -12.305
  212.    64            5460.662          5484.348             23.686
  213.    65            5406.101          5401.603             -4.498
  214.    66            5323.577          5321.318             -2.259
  215.    67            5233.126          5243.384             10.258
  216.    68            5177.712          5167.700            -10.012
  217.    69            5091.690          5094.170              2.480
  218.    70            5023.805          5022.703             -1.102
  219.    71            4957.695          4953.214             -4.481
  220.    72            4852.686          4885.621             32.935
  221.    73            4830.587          4819.848            -10.739
  222.    74            4759.720          4755.822             -3.898
  223.    75            4709.760          4693.476            -16.285
  224.    76            4644.917          4632.742            -12.175
  225.    77            4581.730          4573.561             -8.170
  226.    78            4485.554          4515.872             30.318
  227.    79            4470.783          4459.621            -11.162
  228.    80            4406.844          4404.754             -2.090
  229.  
  230.  
  231. Sampling Rate vs. Recording Divider
  232. -----------------------------------
  233.  
  234. This uses the same data as for recording divider vs. sampling rate.  In 
  235. this case, the reciprocal of the sampling rate is taken as the independent 
  236. variable.  The least-squares line is:
  237.  
  238.                        3.579865E+05
  239.   recording_divider := ------------- - 1.276329
  240.                        sampling_rate
  241.  
  242. Recording    Sampling    Recording     Residual
  243.  divider       rate       divider      (computed
  244. (actual)       (Hz)      (computed)    - actual)
  245. ---------    --------    ----------    ---------
  246.  
  247.     1       156052.044     1.017691     0.017691
  248.     2       115784.421     1.815507    -0.184493
  249.     3        83690.555     3.001173     0.001173
  250.     4        62776.794     4.426200     0.426200
  251.     5        58902.894     4.801242    -0.198758
  252.     6        50223.874     5.851487    -0.148513
  253.     7        41855.727     7.276540     0.276540
  254.     8        38666.527     7.981977    -0.018023
  255.     9        34934.468     8.971044    -0.028956
  256.    10        31394.232    10.126611     0.126611
  257.    11        29507.844    10.855582    -0.144418
  258.    12        26909.865    12.026842     0.026842
  259.    13        25116.180    12.976895    -0.023105
  260.    14        23546.478    13.927072    -0.072928
  261.    15        21571.257    15.319206     0.319206
  262.    16        20930.782    15.827024    -0.172976
  263.    17        19696.155    16.899125    -0.100875
  264.    18        18779.187    17.786613    -0.213387
  265.    19        17856.326    18.771835    -0.228165
  266.    20        16907.821    19.896509    -0.103491
  267.    21        15698.547    21.527473     0.527473
  268.    22        15504.791    21.812441    -0.187559
  269.    23        14775.102    22.952712    -0.047288
  270.    24        14142.330    24.036795     0.036795
  271.    25        13651.017    24.947838    -0.052162
  272.    26        13137.240    25.973425    -0.026575
  273.    27        12559.070    27.227896     0.227896
  274.    28        12289.002    27.854316    -0.145684
  275.    29        11801.303    29.058165     0.058165
  276.    30        11417.396    30.078155     0.078155
  277.    31        11081.540    31.028437     0.028437
  278.    32        10647.172    32.346361     0.346361
  279.    33        10465.832    32.928936    -0.071064
  280.    34        10184.170    33.874946    -0.125054
  281.    35         9915.147    34.828689    -0.171311
  282.    36         9660.952    35.778669    -0.221331
  283.    37         9404.320    36.789853    -0.210147
  284.    38         8970.912    38.628929     0.628929
  285.    39         8944.488    38.746818    -0.253182
  286.    40         8683.834    39.948153    -0.051847
  287.    41         8471.381    40.982018    -0.017982
  288.    42         8291.352    41.899568    -0.100432
  289.    43         8098.821    42.925977    -0.074023
  290.    44         7849.594    44.329413     0.329413
  291.    45         7762.950    44.838429    -0.161571
  292.    46         7583.827    45.927617    -0.072383
  293.    47         7387.860    47.179727     0.179727
  294.    48         7257.915    48.047280     0.047280
  295.    49         7098.064    49.158066     0.158066
  296.    50         6977.443    50.029939     0.029939
  297.    51         6860.313    50.905920    -0.094080
  298.    52         6728.250    51.930160    -0.069840
  299.    53         6610.217    52.880223    -0.119777
  300.    54         6496.240    53.830404    -0.169596
  301.    55         6279.715    55.730488     0.730488
  302.    56         6279.698    55.730642    -0.269358
  303.    57         6153.434    56.900384    -0.099616
  304.    58         6054.257    57.853398    -0.146602
  305.    59         5955.558    58.833330    -0.166670
  306.    60         5841.633    60.005604     0.005604
  307.    61         5708.848    61.430992     0.430992
  308.    62         5675.196    61.802825    -0.197175
  309.    63         5581.973    62.856293    -0.143707
  310.    64         5460.662    64.281027     0.281027
  311.    65         5406.101    64.942664    -0.057336
  312.    66         5323.577    65.969164    -0.030836
  313.    67         5233.126    67.131457     0.131457
  314.    68         5177.712    67.863585    -0.136415
  315.    69         5091.690    69.031675     0.031675
  316.    70         5023.805    69.981724    -0.018276
  317.    71         4957.695    70.931938    -0.068062
  318.    72         4852.686    72.494478     0.494478
  319.    73         4830.587    72.831965    -0.168035
  320.    74         4759.720    73.935356    -0.064644
  321.    75         4709.760    74.733184    -0.266816
  322.    76         4644.917    75.794276    -0.205724
  323.    77         4581.730    76.857163    -0.142837
  324.    78         4485.554    78.532444     0.532444
  325.    79         4470.783    78.796124    -0.203876
  326.    80         4406.844    79.957897    -0.042103
  327.  
  328.  
  329.  
  330. Playback Divider vs. Sampling Rate
  331. ----------------------------------
  332.  
  333. The actual sampling rate for each playback divider was measured with a 
  334. special program, Testplay.  Testplay played a 65535-byte buffer (at zero 
  335. volume) twice and measured the elapsed time using the PC's programmable 
  336. interval timer.
  337.  
  338. The computed values below are based on the formula:
  339.  
  340.                       3579545
  341.   sampling_rate = ----------------
  342.                   playback_divider
  343.  
  344. Playback    Sampling rate,    Sampling rate,         Residual
  345. divider      Hz (actual)      Hz (computed)     (computed - actual)
  346. --------    --------------    --------------    -------------------
  347.  
  348.    20         166411.322        178977.250           12565.928
  349.    30         119231.326        119318.167              86.841
  350.    40          89441.514         89488.625              47.111
  351.    50          71560.389         71590.900              30.511
  352.    60          59638.192         59659.083              20.891
  353.    70          51121.478         51136.357              14.879
  354.    80          44732.986         44744.312              11.327
  355.    90          39763.854         39772.722               8.868
  356.   100          35788.358         35795.450               7.092
  357.   110          32535.343         32541.318               5.975
  358.   120          29825.073         29829.542               4.469
  359.   130          27530.975         27534.962               3.986
  360.   140          25564.775         25568.179               3.403
  361.   150          23860.687         23863.633               2.946
  362.   160          22369.593         22372.156               2.563
  363.   170          21053.735         21056.147               2.412
  364.   180          19884.625         19886.361               1.737
  365.   190          18838.154         18839.711               1.556
  366.   200          17896.251         17897.725               1.474
  367.   210          17044.185         17045.452               1.268
  368.   220          16269.480         16270.659               1.179
  369.   230          15562.153         15563.239               1.086
  370.   240          14913.816         14914.771               0.954
  371.   250          14317.222         14318.180               0.958
  372.   260          13766.662         13767.481               0.819
  373.   270          13256.820         13257.574               0.754
  374.   280          12783.452         12784.089               0.637
  375.   290          12342.661         12343.259               0.598
  376.   300          11931.182         11931.817               0.635
  377.   310          11546.377         11546.919               0.542
  378.   320          11185.496         11186.078               0.582
  379.   330          10846.618         10847.106               0.488
  380.   340          10527.609         10528.074               0.465
  381.   350          10226.849         10227.271               0.422
  382.   360           9942.834          9943.181               0.347
  383.   370           9674.123          9674.446               0.323
  384.   380           9419.519          9419.855               0.337
  385.   390           9178.013          9178.321               0.307
  386.   400           8948.522          8948.863               0.341
  387.   410           8730.307          8730.598               0.291
  388.   420           8522.435          8522.726               0.291
  389.   430           8324.267          8324.523               0.256
  390.   440           8135.031          8135.330               0.299
  391.   450           7954.316          7954.544               0.228
  392.   460           7781.375          7781.620               0.244
  393.   470           7615.824          7616.053               0.229
  394.   480           7457.141          7457.385               0.244
  395.   490           7304.956          7305.194               0.238
  396.   500           7158.888          7159.090               0.202
  397.   510           7018.520          7018.716               0.196
  398.   520           6883.533          6883.740               0.207
  399.   530           6753.706          6753.858               0.152
  400.   540           6628.643          6628.787               0.144
  401.   550           6508.103          6508.264               0.160
  402.   560           6391.910          6392.045               0.135
  403.   570           6279.754          6279.904               0.149
  404.   580           6171.495          6171.629               0.134
  405.   590           6066.915          6067.025               0.110
  406.   600           5965.805          5965.908               0.103
  407.   610           5868.001          5868.107               0.105
  408.   620           5773.360          5773.460               0.100
  409.   630           5681.693          5681.817               0.124
  410.   640           5592.918          5593.039               0.121
  411.   650           5506.903          5506.992               0.089
  412.   660           5423.472          5423.553               0.081
  413.   670           5342.525          5342.604               0.080
  414.   680           5263.932          5264.037               0.105
  415.   690           5187.645          5187.746               0.101
  416.   700           5113.561          5113.636               0.074
  417.   710           5041.546          5041.613               0.067
  418.   720           4971.526          4971.590               0.065
  419.   730           4903.407          4903.486               0.079
  420.   740           4837.143          4837.223               0.080
  421.   750           4772.662          4772.727               0.065
  422.   760           4709.845          4709.928               0.082
  423.   770           4648.698          4648.760               0.062
  424.   780           4589.080          4589.160               0.080
  425.   790           4531.004          4531.070               0.066
  426.   800           4474.374          4474.431               0.057
  427.   810           4419.125          4419.191               0.066
  428.   820           4365.227          4365.299               0.072
  429.   830           4312.635          4312.705               0.070
  430.   840           4261.316          4261.363               0.048
  431.   850           4211.168          4211.229               0.062
  432.   860           4162.186          4162.262               0.076
  433.   870           4114.361          4114.420               0.059
  434.   880           4067.606          4067.665               0.059
  435.   890           4021.915          4021.961               0.046
  436.   900           3977.222          3977.272               0.050
  437.